//
//  Common1.h
//  HDGuidePenSystem
//
//  Created by hengdaliuyi on 16/4/20.
//  Copyright © 2016年 hengdawb. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "HDCommonH.h"
#import <CoreBluetooth/CoreBluetooth.h>

//单例
#undef	AS_SINGLETON
#define AS_SINGLETON( __class ) \
+ (__class *)sharedInstance;

#undef	DEF_SINGLETON

#define DEF_SINGLETON( __class ) \
+ (__class *)sharedInstance \
{ \
static dispatch_once_t once; \
static __class * __singleton__; \
dispatch_once( &once, ^{ __singleton__ = [[__class alloc] init]; } ); \
return __singleton__; \
}


/*
 *
 */
@interface Common1 : NSObject<NSCoding>
AS_SINGLETON(Common1);

@property (nonatomic,   copy) CBPeripheral     *currentPeripheral;
@property (strong, nonatomic) CBCharacteristic *writeCharacteristic;
@property (strong, nonatomic) CBCharacteristic *readCharacteristic;


@end
